:root {
    --aside-width: 280px;
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --aside-bg: #1e293b;
    --aside-active: #334155;
    --header-height: 60px;
    --transition-speed: 0.3s;
}

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

html,
body {
    /*overflow-y: hidden;*/
    height: 100vh;
}

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #f8fafc;
    color: #1e293b;
    overflow-x: hidden;
}

/* 侧边栏样式 */
aside {
    width: var(--aside-width);
    height: 100vh;
    background: var(--aside-bg);
    position: fixed;
    top: 0;
    left: 0;
    transition: all var(--transition-speed) ease;
    z-index: 1000;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.aside-header {
    display: flex;
    padding-left: 2rem;
    align-items: center;
    height: var(--header-height);
    background-color: rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.aside-header a {
    display: flex;
    color: var(--primary-color);
    margin: 0;
    font-weight: 600;
    font-size: 1.25rem;
    align-items: center;
    text-decoration: none;
}

.aside-header a:hover {
    text-decoration: none;
}

.aside-header i {
    margin-right: 10px;
    font-size: 40px;
}

.aside-body #menu-ul {
    padding: 1rem 0;
}

#menu-ul li a {
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

#menu-ul li a:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.05);
    border-left-color: var(--primary-color);
}

#menu-ul li a i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

#menu-ul li.active > a {
    color: white;
    background-color: var(--aside-active);
    border-left-color: var(--primary-color);
    font-weight: 500;
}

/* 内容区域 */
#content {
    display: flex;
    flex-direction: column;
    margin-left: var(--aside-width);
    width: calc(100% - var(--aside-width));
    height: 100%;
    transition: all var(--transition-speed) ease;
    background-color: #f8fafc;
}

/* 顶部导航栏 */
header {
    display: flex;
    justify-content: flex-end;

    height: var(--header-height);
    padding: 0 1.5rem;
    background-color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

#user-info-dropdown {
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

#user-info-dropdown:hover {
    opacity: 0.9;
}

#user-info-dropdown #profile-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    margin-right: 10px;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

#user-info-dropdown #profile-username {
    font-weight: 500;
    color: #1e293b;
}

/* 主内容区域 */
main {
    /*height: calc(100% - var(--header-height));*/
    flex: 1;
}

/* 子页面 */
.search-card {
    background-color: white;
    padding: 1.25rem;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    /*border-radius: 8px;*/
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.table-card {
    background-color: white;
    padding: 1.25rem;
    /*margin-bottom: 1.5rem;*/
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.table-card .button-wrapper {
    margin-bottom: 0.5rem;
}

.table-card .loading-spinner {
    display: none;
    text-align: center;
    padding: 2rem;
}

.table-card .pagination {
    justify-content: center;
    margin-top: 1.5rem;
}

/* 响应式设计 */
@media (max-width: 992px) {
    aside {
        margin-left: calc(-1 * var(--aside-width));
    }

    aside.active {
        margin-left: 0;
    }

    #content {
        width: 100%;
        margin-left: 0;
    }

    #content.active {
        margin-left: var(--aside-width);
        width: calc(100% - var(--aside-width));
    }
}

/* 加载动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease forwards;
}

/* 底部 */
footer {
    display: flex;
    justify-content: center;
    height: var(--header-height);
    line-height: var(--header-height);
    width: calc(100% - var(--aside-width));
    padding: 0 1.5rem;
    background-color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: fixed;
    bottom: 0;
    right: 0;
    z-index: 100;
    color: #7A7C7F;
}